package sisgel;

import java.util.ArrayList;

public class Equipments {
	
	private ArrayList<String> equipmentId = new ArrayList<String>();
	private ArrayList<String> state = new ArrayList<String>();
	private String name;
	private String description;
	private int amount;
	private int available;
	
	public Equipments() {
		super();
		amount = 0;
		available = 0;
	}
	
	public Equipments(String name, String description) {
		this();
		this.name = name;
		this.description = description;
	}
	
	public void insertEquipment(String equipmentId, String state) {
		this.equipmentId.add(equipmentId);
		this.state.add(state);
	}
	
	public String getState(String equipmentId) {
		int index = this.equipmentId.indexOf(equipmentId);
		
		if (index >= 0)
			return state.get(index);
		else
			return null;
	}
	
	public void setState(String equipmentId, String state) {
		int index = this.equipmentId.indexOf(equipmentId);
		
		if (index >= 0)
			this.state.set(index, state);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getAmount() {
		return amount;
	}

	public int getAvailable() {
		return available;
	}

}
